package cn.stylefeng.guns.dao.impl;

import cn.stylefeng.guns.dao.entity.Goods;
import cn.stylefeng.guns.dao.entity.Supplier;
import cn.stylefeng.guns.dao.mapper.GoodsMapper;
import cn.stylefeng.guns.dao.IGoodsService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author quspacedraon
 * @since 2024-01-25
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {
    @Override
    public Boolean isExist(String commodityCode) {
        return this.count(Wrappers.<Goods>lambdaQuery().eq(Goods::getCommodityCode, commodityCode)) > 0;
    }
}
